package org.linlinjava.litemall.db.enumeration;


/**
 * 常数类
 */
public class Const {


    /**
     * 订单微信支付回调接口
     */
    public static String ORDER_NOTIFY_URI = "https://www.lygoo.cn/wx2/order/pay-notify";


    /**
     * 商品类型
     */
    public static class GOODS_TYPE {
        public static Integer NONE      = 0;         //普通
        public static Integer GROUP     = 1;         //拼团
        public static Integer SECKILL   = 2;         //秒杀
        public static Integer TIMELY    = 3;         //及时达
    }

    /**
     * 商品活动状态
     */
    public static class ACTIVITY_STATUS {
        public static Integer NONE      = 0;         //普通
        public static Integer GROUP     = 1;         //拼团
        public static Integer SECKILL   = 2;         //秒杀
    }

    /**
     * 商品状态
     */
    public static class GOODS_STATUS {
        public static Integer NONE          = 0;         //上架中
        public static Integer ADVANCESALE   = 1;         //定时预售
        public static Integer WAREHOUSE     = 2;         //仓库
        public static String value(Integer v){
            String res = "上架中";
            switch (v){
                case 0:res = "上架中";break;
                case 1:res = "定时预售";break;
                case 2:res = "仓库";break;
            }
            return res;
        }
    }
    /**
     * 用户身份
     */
    public static class Identity {
        public static Integer GOODS_MANAGER = -2;   //商品管理员
        public static Integer GOODS_SENDER  = -1;   //商品配送员

        public static Integer USER          = 0;    //普通用户
        public static Integer DISTRIBUTOR   = 1;    //个人团长
        public static Integer SELFMENTION   = 2;    //提货点
        public static Integer FRANSHISED    = 3;    //加盟店
        public static Integer FRANSHISED2   = 4;    //特殊加盟店
        public static Integer DIRECT        = 5;    //平台直营店

        public static String value(Integer v){
            String res = "普通用户";
            switch (v){
                case 0:res = "普通用户";break;
                case 1:res = "个人团长";break;
                case 2:res = "提货点";break;
                case 3:res = "加盟店";break;
                case 4:res = "特殊加盟店";break;
                case 5:res = "平台直营店";break;
                case -1:res = "商品配送员";break;
                case -2:res = "商品管理员";break;
            }
            return res;
        }

        public static Integer type(String s){
            if("个人团长".equals(s))
                return 1;
            if("提货点".equals(s))
                return 2;
            if("加盟店".equals(s))
                return 3;
            if("特殊加盟店".equals(s))
                return 4;
            if("平台直营店".equals(s))
                return 5;
            return 1;
        }
    }

    /**
     * 团长申请类型
     */
    public static class APPLY_TYPE{
        public static Integer _0      = 1;        //个人团长
        public static Integer _1      = 2;        //提货团长
        public static Integer _2      = 3;        //加盟店团长
        public static Integer _3      = 4;        //特殊加盟店团长
        public static Integer _4      = 5;        //直营店团长

        public static String value(Integer v){
            String res = "个人团长";
            switch (v){
                case 0:res = "个人团长";break;
                case 1:res = "提货团长";break;
                case 2:res = "加盟店团长";break;
                case 3:res = "特殊加盟店团长";break;
                case 4:res = "直营团长";break;
            }
            return res;
        }


    }

    public static class COUPON_TYPE {
        public static Integer RED_PACKET            = 0;    //红包
        public static Integer LUCK_COUPON           = 1;    //抽奖优惠券
        public static Integer HOLIDY_COUPON         = 2;    //节日优惠券
        public static Integer NEW_PEOPLE_COUPON     = 3;    //新人优惠券

        public static Integer type(String s){
            if("红包".equals(s))
                return 0;
            if("抽奖优惠券".equals(s))
                return 1;
            if("节日优惠券".equals(s))
                return 2;
            if("新人优惠券".equals(s))
                return 3;
            return 0;
        }
        public static String value(Integer v){
            String res = "红包";
            switch (v){
                case 0:res = "红包";break;
                case 1:res = "抽奖优惠券";break;
                case 2:res = "节日优惠券";break;
                case 3:res = "新人优惠券";break;
            }
            return res;
        }
    }

    /**
     * 抽奖类型
     */
    public static class PRIZE_TYPE {
        public static Integer RED_PACKET = 0;        //红包
        public static Integer COUPON     = 1;        //优惠券
        public static Integer SCORE      = 2;        //积分
    }

    /**
     * 用户优惠券状态
     */
    public static class USER_COUPON_STATUS {
        public static Integer NO_USE     = 0;        //未使用
        public static Integer USED       = 1;        //已使用
        public static Integer EXPIRE     = 2;        //已过期
        public static Integer LOCKED     = 3;        //锁定（订单未支付）
    }


    /**
     * 订单状态
     */
    public static class ORDER_STATUS_TYPE {
        public static Integer NO_PAYMENT     = 0;        //待付款
        public static Integer NO_SEND        = 1;        //待派送
        public static Integer NO_PICK_UP     = 2;        //待提货
        public static Integer NO_SHARE       = 3;        //待分享
        public static Integer FINISHED       = 4;        //已完成
        public static Integer LOCKED         = 5;        //锁定
        public static Integer INVALID        = 6;        //无效、过期
        public static Integer EXPIRE         = 7;        //未支付导致，过期
        public static Integer EXPIRE_RECEIPT = 8;        //未收货导致，过期
        @Deprecated
        public static Integer NO_DELIVER     = 9;        //待发货

        public static String value(Integer v){
            String res = "非法状态";
            switch (v){
                case 0:res = "待付款";break;
                case 1:res = "待派送";break;
                case 2:res = "待提货";break;
                case 3:res = "待分享";break;
                case 4:res = "已完成";break;
                case 5:res = "锁定";break;
                case 6:res = "无效";break;
                case 7:res = "过期(未支付)";break;
                case 8:res = "过期(未收货)";break;
                case 9:res = "待发货";break;
            }
            return res;
        }
    }

    /**
     * 订单配送方式
     */
    public static class SEND_TYPE{
        public static Integer SELF_MENTION  = 0;        //自提
        public static Integer NORMAL        = 1;        //团长普通配送
        public static Integer TIMELY        = 2;        //及时达
        public static String value(Integer v){
            String res = "自提";
            switch (v){
                case 0:res = "自提";break;
                case 1:res = "团长普通配送";break;
                case 2:res = "及时达";break;
            }
            return res;
        }
    }

    /**
     * 订单类型
     */
    public static class ORDER_TYPE{
        public static Integer NORMAL         = 0;        //普通订单
        public static Integer GROUP          = 1;        //团购
        public static Integer SECKILL        = 2;        //秒杀
        public static Integer TIMELY         = 3;        //及时达
        public static String value(Integer v){
            String res = "普通订单";
            switch (v){
                case 0:res = "普通订单";break;
                case 1:res = "团购";break;
                case 2:res = "秒杀";break;
                case 3:res = "及时达";break;
            }
            return res;
        }
    }

    /**
     * 订单支付类型
     */
    public static class ORDER_PAY_TYPE{
        public static Integer WX             = 0;        //微信支付
        public static Integer BALANCE        = 1;        //余额
        public static String value(Integer v){
            String res = "微信支付";
            switch (v){
                case 0:res = "微信支付";break;
                case 1:res = "余额";break;
            }
            return res;
        }
    }

    public static class GROUP_ORDER_STATUS_TYPE {
        public static Integer NO_OPEN           = 0;        //未开团：团订单还未支付
        public static Integer OPEN_NO_FULL      = 1;        //已开团，但人数未满
        public static Integer OPEN_FULL         = 2;        //已开团，人数已满
        public static Integer FINISHED          = 3;        //完成：已成团
        public static Integer INVALID           = 4;        //完成但算无效：活动时间内,人数未满
    }

    /**
     * 团长申请状态
     */
    public static class APPLY_STATUS{
        public static Integer WAIT      = 0;        //待审核
        public static Integer SUCCESS   = 1;        //已通过
        public static Integer FAIL      = 2;        //审核失败
        public static String value(Integer v){
            String res = "待审核";
            switch (v){
                case 0:res = "待审核";break;
                case 1:res = "审核通过";break;
                case 2:res = "审核失败";break;
            }
            return res;
        }
    }



    /**
     * 金额类型
     */
    public static class AMOUNT_TYPE{
        public static Integer NORMAL        = 0;         //正常营收
        public static Integer DISTRIBUTION  = 1;         //分销
        public static Integer SUB           = 2;         //下级贡献(个人团长)
        public static Integer SUB2          = 3;         //下级贡献(提货团长)
        public static Integer PICKUP        = 4;         //提货佣金
        public static Integer SEND          = 5;         //邮费
        public static Integer RED           = 6;         //使用红包(购买时用的红包)
        public static Integer RED_OUT       = 7;         //使用红包(商家支出的红包)
        public static Integer COM_ZHICHU    = 8;         //佣金支出
        public static Integer CASH_OUT      = 9;         //提现
        public static Integer RED_R_B       = 10;        //红包报销
        public static Integer BACK_CASH_OUT = 11;        //拼团返现


        public static String value(Integer v){
            String res = "非法状态";
            switch (v){
                case 0:res = "正常营收";break;
                case 1:res = "分销";break;
                case 2:res = "下级贡献(个人团长)";break;
                case 3:res = "下级贡献(提货团长)";break;
                case 4:res = "提货佣金";break;
                case 5:res = "邮费";break;
                case 6:res = "使用红包";break;
                case 7:res = "商家支出红包";break;
                case 8:res = "佣金支出";break;
                case 9:res = "提现";break;
                case 10:res = "红包报销";break;
                case 11:res = "拼团返现";break;
            }
            return res;
        }
    }


    public static class CASH_OUT_APPLY_STATUS {
        public static Integer doing        = 0;        //审核中
        public static Integer ok           = 1;        //通过
        public static Integer fail         = 2;        //失败

        public static String value(Integer v){
            String res = "非法状态";
            switch (v){
                case 0:res = "审核中";break;
                case 1:res = "已通过";break;
                case 2:res = "未通过";break;
            }
            return res;
        }
    }



}
